# Maintainer: David Runge <dave@sleepmap.de>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: foutrelis
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: SpepS <dreamspepser at yahoo dot it>

pkgname=libsmf
pkgver=1.3
pkgrel=11
pkgdesc='A C library for handling SMF ("*.mid") files.'
arch=('loong64' 'x86_64')
url="https://sourceforge.net/projects/libsmf/"
license=('BSD')
depends=('glib2')
provides=('libsmf.so')
source=("https://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha512sums=('3c383ec8f2fbe48ddab1008b3ecfe6941c38e33cfd963eabdf07f09c8c04c1b8758c8774b25672f70c29b570f2c250c795979d19b39c5027810b54b07035497d')

build() {
  cd "${pkgname}-${pkgver}"
  ./configure --prefix=/usr \
              --enable-static=no
  make
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -vDm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -vDm 644 {NEWS,TODO} -t "${pkgdir}/usr/share/doc/${pkgname}"
}

